export default {
  namespace: 'counter',
  state: {
    num: 0,
  },
  effects: {
    *error({ payload: e }, {}) {
      // debugger;
      console.error('error:', e);
    },
  },
  reducers: {
    addNum(state, {}) {
      return { ...state, num: state.num + 1 };
    },
    minus(state, {}) {
      return { ...state, num: state.num - 1 };
    },
  },
};
